package com.cqut.forum.entity;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Lob;

import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author yangxun
 * Wall entity
 */
@Entity
@Table(name = "face_wall", catalog = "forum")
public class FaceWall implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer wallId;
	private String wallName;
	private Date publishTime;
	private String wallContents;
	private String pictureSrc;
  	private String frameColor;
	private String pictureColor;
	private Integer wallRotate;
	private Integer wallWidth;
	private Integer wallLeft;
	private Integer wallTop;
	private Integer userId;
	private Boolean wallState;
	/*	
	 */
	//private Set<AritcleVisitLog> aritcleVisitLogs = new HashSet<AritcleVisitLog>(
	//		0);

	// Constructors

	/** default constructor */
	public FaceWall() {
	}

	/** full constructor */
/*	public FaceWall(String wallName,Date publishTime,String wallContents,
			String pictureSrc,String frameColor,String pictureColor,Integer wallRotate,
			Integer wallWidth,Integer wallLeft,Integer wallTop,Integer userId) {
		this.wallName = wallName;
		this.publishTime = publishTime;
		this.wallContents = wallContents;
		this.pictureSrc = pictureSrc;
		this.frameColor = frameColor;
		this.pictureColor = pictureColor;
		this.wallRotate = wallRotate;
		this.wallWidth = wallWidth;
		this.wallLeft = wallLeft;
		this.wallTop = wallTop;
		this.userId = userId;
	}*/

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "wall_id", unique = true, nullable = false)
	public Integer getWallId() {
		return wallId;
	}

	public void setWallId(Integer wallId) {
		this.wallId = wallId;
	}
	@Column(name = "wall_name", length = 100)
	public String getWallName() {
		return wallName;
	}

	public void setWallName(String wallName) {
		this.wallName = wallName;
	}
	@Column(name = "publish_time", length = 10)
	public Date getPublishTime() {
		return publishTime;
	}

	public void setPublishTime(Date publishTime) {
		this.publishTime = publishTime;
	}
	@Lob
	@Column(name = "wall_contents",columnDefinition="TEXT")
	//@Column(name = "wall_contents", length = 500)
	public String getWallContents() {
		return wallContents;
	}

	public void setWallContents(String wallContents) {
		this.wallContents = wallContents;
	}
	@Column(name = "picture_src", length = 100)
	public String getPictureSrc() {
		return pictureSrc;
	}

	public void setPictureSrc(String pictureSrc) {
		this.pictureSrc = pictureSrc;
	}
	
	@Column(name = "frame_color", length = 100)
	public String getFrameColor() {
		return frameColor;
	}

	public void setFrameColor(String frameColor) {
		this.frameColor = frameColor;
	}
	@Column(name = "picture_color", length = 100)
	public String getPictureColor() {
		return pictureColor;
	}

	public void setPictureColor(String pictureColor) {
		this.pictureColor = pictureColor;
	}
	@Column(name = "wall_rotate")
	public Integer getWallRotate() {
		return wallRotate;
	}

	public void setWallRotate(Integer wallRotate) {
		this.wallRotate = wallRotate;
	}

	@Column(name = "wall_width")
	public Integer getWallWidth() {
		return wallWidth;
	}

	public void setWallWidth(Integer wallWidth) {
		this.wallWidth = wallWidth;
	}

	@Column(name = "wall_left")
	public Integer getWallLeft() {
		return wallLeft;
	}

	public void setWallLeft(Integer wallLeft) {
		this.wallLeft = wallLeft;
	}

	@Column(name = "wall_top")
	public Integer getWallTop() {
		return wallTop;
	}

	public void setWallTop(Integer wallTop) {
		this.wallTop = wallTop;
	}

	@Column(name = "user_id")
	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}
	@Column(name = "wall_state")
	public Boolean getWallState() {
		return wallState;
	}

	public void setWallState(Boolean wallState) {
		this.wallState = wallState;
	}
	
	/*
	 */
}